home *** CD-ROM | disk | FTP | other *** search
/ Business Heaven / Business Heaven.iso / network / doc_proc / workfile.doc < prev   
Text File  |  1992-11-08  |  20KB  |  247 lines

  1.                                                                                 
  2.                                                                                 
  3.                                                                                 
  4.                                                                                 
  5.                                                                                 
  6.                                                                                 
  7.                                                                                 
  8.                                                                                 
  9.                                                                                 
  10.                                                                                 
  11.                                                                                 
  12.                                                                                 
  13.                                                                                 
  14.                        *************************************                    
  15.                        *                                   *                    
  16.                        *        W O R K F I L E S          *                    
  17.                        *  ON THE MVS/XA OPERATING SYSTEM   *                    
  18.                        *                                   *                    
  19.                        *************************************                    
  20.                                                                                 
  21.                                                                                 
  22.                                                                                 
  23.                                                                                 
  24.                                                                                 
  25.                                                                                 
  26.                                                                                 
  27.                                                                                 
  28.                                                                                 
  29.                                                                                 
  30.                                                                                 
  31.                                                                                 
  32.                                                                                 
  33.                                                                                 
  34.                                                                                 
  35.                                                                                 
  36.                                                                                 
  37.                                                                                 
  38.                                                                                 
  39.                                                                                 
  40.                                                                                 
  41.                                                                                 
  42.                                                                                 
  43.                                                                                 
  44.                                                                                 
  45.                                                                                 
  46.                                                                                 
  47.                                                                                 
  48.                                                                                 
  49.                                                                                 
  50.                                                                                 
  51.                                                                                 
  52.                                                                                 
  53.                                                         John S. Ward            
  54.                                                           03/15/93              
  55.  
  56. EJECT                                                                           
  57.    )F FUNCTION -                                                                
  58.     Batch and TSO procedures have been developed to allow the user              
  59.     to create "work" disk data sets that will stay on the system for            
  60.     24 to 48 hours.  A "work" or "day" data set will be erased during           
  61.     system backups when its creation date is less than the Julian date          
  62.     of the backup minus 1.  These data sets will not be backed up; i.e.,        
  63.     they cannot be retrieved from backup tapes if they are inadvertently        
  64.     erased or destroyed by the user.                                            
  65.                                                                                 
  66.     Users are encouraged to utilize workfile space when at all                  
  67.     possible.  Under the GSU disk space control system, DASD tracks             
  68.     used for workfile datasets are not accumulated against a user's             
  69.     maximum allowed DASD tracks.                                                
  70.                                                                                 
  71.     Examples:                                                                   
  72.                                                                                 
  73.     1.  %WORKFILE DSN(COBOL) DIR(10) QUAL(userid)                               
  74.         This example creates a partitioned data set called                      
  75.         userid.DAY.COBOL with a high level qualifier "userid" that the          
  76.         user has access authority to, with a logical record length of 80        
  77.         characters and a blocksize of 6320.  The data set will have a           
  78.         primary allocation of 1 track and a secondary allocation of             
  79.         3 tracks.                                                               
  80.     2.  %WORKFILE DSN(LIST) RECFM(VBA) LRECL(137) BLKSIZE(5895)                 
  81.         This example creates a variable blocked sequential data set called      
  82.         userid.DAY.LIST.  The logical record length is 137 characters           
  83.         (4 bytes for the record length, 1 byte for the ANSI carriage            
  84.         control character and 132 bytes for data) with a blocksize of           
  85.         5895 characters.  The data set has a primary allocation of 1            
  86.         track and a secondary allocation of 3 tracks.                           
  87.                                                                                 
  88.     3.  %WORKFILE DSN(TEST.JCL) UNIT(BLK) AVGB(6320) SPACE(10) DIR(20)          
  89.         This example creates a fixed blocked partitioned data set               
  90.         called userid.DAY.TEST.JCL.  The logical record length is               
  91.         80 bytes with a blocksize of 6320.  The data set is allocated           
  92.         in blocks of 6320 characters; the primary allocation is 10 of           
  93.         such blocks with the secondary being 3 blocks.                          
  94.                                                                                 
  95.     Execution Results:                                                          
  96.                                                                                 
  97.     The %WORKFILE clist sets the &LASTCC symbolic variable and sends a          
  98.     message regarding the status of the allocation:                             
  99.                                                                                 
  100.          &LASTCC        MESSAGE                                                 
  101.     --------------------------------------------------------------------        
  102.            0            dataset name HAS BEEN ALLOCATED                         
  103.            4            dataset name ALREADY EXISTS                             
  104.            8            INVALID LRECL (n) FOR BLKSIZE (n) FOR RECFM             
  105.                         (FB|FBA) DATASET                                        
  106.            8            ERROR IN ALLOCATION OF dataset name                     
  107.            8            dataset name ERROR: ERROR PROCESSING REQUESTED          
  108.                         DATASET                                                 
  109.            8            dataset name ERROR: INVALID DATA SET NAME, xxxx         
  110.            8            dataset name ERROR: VOLUME NOT ON SYSTEM                
  111.           12            INSUFFICIENT AUTHORITY                                  
  112.           12            USER NOT MEMBER OF GROUP                                
  113.           16            DSN PARAMETER MUST BE SPECIFIED                         
  114.           16            UNIT(BLK) SPECIFIED, AVGB(N) MUST BE SPECIFIED          
  115.           16            INVALID DSORG - value - SPECIFIED.  MUST BE
  116.                         PS, PO or DA                                            
  117.                                                                                 
  118.     A clist that you write to call %WORKFILE could test the value of            
  119.     &LASTCC to determine the success or failure of the data set                 
  120.     allocation.                                                                 
  121.                                                                                 
  122.     TSO Execution                                                               
  123.                                                                                 
  124.     The TSO clist can be called from the 6 screen using the command             
  125.     %WORKFILE or from any ISPF main command line by typing TSO                  
  126.     %WORKFILE.  Below is a description of the parameters and their              
  127.     defaults:                                                                   
  128.                                                                                 
  129.     BATCH Execution                                                             
  130.                                                                                 
  131.     The JCL procedure called WORKFILE can be executed to allocate a             
  132.     workfile during a batch job stream by coding:                               
  133.                                                                                 
  134.        //STEP1   EXEC  WORKFILE,param1,param2                                   
  135.                                                                                 
  136.           Execution Results:                                                    
  137.                                                                                 
  138.     The WORKFILE procedure actually sets up a batch TSO environment and         
  139.     executes the %WORKFILE clist.  Using this technique, the same
  140.     messages described above will be printed on the job output.
  141.     Similarly, the step return code will be set to the value of the             
  142.     &LASTCC symbolic variable.  Successive job steps can test the value         
  143.     of this return code to determine whether to continue execution.             
  144.                                                                                 
  145.     For example, you may not want to execute the next step in your job          
  146.     stream if the workfile you are requesting to allocate is already            
  147.     allocated.  In which case, you would code:                                  
  148.                                                                                 
  149.           //STEP1   EXEC  WORKFILE,DSN='TEST',UNIT=BLK,AVGB=6320                
  150.           //STEP2   EXEC  PGM=MYPGM,COND=(0,NE,STEP1.WORKFILE)                  
  151.                                                                                 
  152.     In the next example, you do want to execute the next step even if           
  153.     the workfile has previously been allocated.  That is, the only              
  154.     condition under which the next step should not be executed is if            
  155.     allocation failed - the return code is 8 or 16.  You could code:            
  156.                                                                                 
  157.          //STEP3    EXEC  WORKFILE,DSN='TEST2',RECFM=VBA,LRECL=137,             
  158.          //         BLKSIZE=5895                                                
  159.          //STEP4    EXEC  PGM=MYPGM,COND=(4,LT,STEP3.WORKFILE)                  
  160.                                                                                 
  161.     In the above COND= parameters, please note that the stepname.WORKFILE       
  162.     is required.  For more information, please see the MVS/XA JCL               
  163.     Reference Manual GC28-1352.                                                 
  164.    )X SYNTAX -                                                                  
  165.       FOR TSO:                                                                  
  166.          WORKFILE DSN(data set name) UNIT(TRK|CYL|BLK) SPACE(n) DIR(n)          
  167.                  BLKSIZE(n) AVGB(n) LRECL(n) RECFM(F|FB|FBA|V|VB|VBA|U)         
  168.                  DSORG(PS|PO|DA) QUAL(userid)                                   
  169.       FOR BATCH:                                                                
  170.        //stepname EXEC  WORKFILE,DSN='dataset.name',UNIT=TRK|CYL|BLK,           
  171.        //    SPACE=n,SEC=n,DIR=n,BLKSIZE=n,AVGB=n,LRECL=n,                      
  172.        //    RECFM=F|FB|FBA|V|VB|VBA|U,DSORG=PS|PO|DA,QUAL=userid               
  173.       REQUIRED -                                                                
  174.          for TSO:  DSN(data set name)                                           
  175.          for BATCH:  DSN=datasetname                                            
  176.       DEFAULTS - FOR BOTH TSO AND BATCH:                                        
  177.             UNIT(TRK) SPACE(1) SEC(3) DIR(0) BLKSIZE(6320) LRECL(80)            
  178.             RECFM(FB) DSORG(PS) QUAL(your userid)                               
  179.    )O OPERANDS - BOTH TSO AND BATCH FORMATS ARE LISTED                          
  180.    ))DSN(data set name)                                                         
  181.      DSN=                -  This is a required parameter and it is              
  182.                             used to generate the name of the                    
  183.                             workfile which will be                              
  184.                             USERID.DAY.DSN.  DSN value for batch must           
  185.                             be in quotes if it includes periods (.).            
  186.    ))UNIT(TRK|CYL|BLK)                                                          
  187.      UNIT=TRK|CYL|BLK    -  This parameter describes the space unit             
  188.                             to be used in allocating the data set.              
  189.                             DEFAULT: TRK                                        
  190.    ))SPACE(n)                                                                   
  191.      SPACE=n             -  This parameter represents the primary               
  192.                             space allocation for the data set.                  
  193.                             DEFAULT: 1                                          
  194.    ))SEC(n)                                                                     
  195.      SEC=n               -  This parameter represents the secondary             
  196.                             space allocation for the data set.                  
  197.                             DEFAULT: 3                                          
  198.    ))DIR(n)                                                                     
  199.      DIR=n               -  This parameter represents the number of             
  200.                             directory blocks if the data set is to              
  201.                             be allocated as a partitioned data set              
  202.                             (PDS).                                              
  203.                             DEFAULT: 0 (the data set is to be                   
  204.                                      sequential)                                
  205.    ))BLKSIZE(n)                                                                 
  206.      BLKSIZE=n           -  This parameter specifies the blocksize              
  207.                             for the data set.                                   
  208.                             DEFAULT: 6320                                       
  209.    ))AVGB(n)                                                                    
  210.      AVGB=n              -  This parameter describes the average                
  211.                             block length and is required if                     
  212.                             UNIT(BLK) was specified.                            
  213.                             DEFAULT: none                                       
  214.    ))LRECL(n)                                                                   
  215.      LRECL=n             -  This parameter describes the logical                
  216.                             record length for the data set.  If                 
  217.                             RECFM(FB) or RECFM(FBA) is specified,               
  218.                             then LRECL(n) must be an integral                   
  219.                             multiple of BLKSIZE(n).                             
  220.                             DEFAULT: 80                                         
  221.    ))RECFM(F|FB|FBA|                                                            
  222.            V|VB|VBA|U)                                                          
  223.      RECFM=F|FB|FBA|                                                            
  224.            V|VB|VBA|U    -  This parameter describes the record                 
  225.                             format of the data set: F - fixed,                  
  226.                             FB - fixed blocked, FBA - fixed blocked             
  227.                             with ANSI carriage control,                         
  228.                             V - variable, VB - variable blocked,                
  229.                             VBA - variable blocked with ANSI                    
  230.                             carriage control,                                   
  231.                             U - records are of undefined length.                
  232.                             DEFAULT: FB                                         
  233.    ))DSORG(PO|PS|DA)                                                            
  234.      DSORG=PO|PS|DA      -  This parameter describes the data set               
  235.                             organization: PO - partitioned organization,        
  236.                             PS - physical sequential, DA - direct access.       
  237.                             DEFAULTS:  if DIR is specified, the default for     
  238.                             DSORG is PO.  if DIR is not specified, the          
  239.                             default for DSORG is PS.                            
  240.    ))QUAL(userid)                                                               
  241.      QUAL=userid         -  This parameter describes the high level             
  242.                             qualifier that the system will use when             
  243.                             creating the workfile.  This must be a              
  244.                             valid group or userid to which the user             
  245.                             has access authority.                               
  246.                             DEFAULT: your userid                                
  247.